package cn.bdqn.biz_provider.service;


import cn.bdqn.mapper.ArticleMapper;
import cn.bdqn.service.RpcArticleService;
import cn.bdqn.vo.ArticleListSearchVO;
import cn.bdqn.vo.ArticleListVO;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;
@Component
@Service(interfaceClass = RpcArticleService.class)
public class RpcArticleServiceImpl implements RpcArticleService {

    @Resource
    private ArticleMapper articleMapper;

    /***
     * 根据条件查询所有文章
     * @param articleListSearchVO 查询条件
     * @return
     * @throws Exception
     */
    @Override
    public List<ArticleListVO> findArticleByQuery(ArticleListSearchVO articleListSearchVO) throws Exception {
        return articleMapper.selectArticleByQuery(articleListSearchVO);
    }
}
